package com.settlement.system.common.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 系统常量
 *
 * @author haoxr
 * @since  2022/10/22
 */
public interface SystemConstants {

    /**
     * 根节点ID
     */
    Long ROOT_NODE_ID = 0L;


    /**
     * 系统默认密码
     */
    String DEFAULT_PASSWORD = "123456";

    /**
     * 超级管理员角色编码
     */
    String ROOT_ROLE_CODE = "ROOT";

    /**
     * 管理员角色编码
     */
    String ADMIN_ROLE_CODE = "ADMIN";

    // 自认损失
    String OWNER_LOSS = "自认损失";
    // 财务调账
    String FINANCE_RE_BILL = "财务调账";
    // 关联单号
    String LINK_NO = "关联单号";
    String MAIN_NO = "原始主订单号";
    String SUB_NO = "原始子订单号";
    // 业务日期
    String BUSINESS_DATE = "业务日期";
    String OUT_BILL_DATE = "出账日期";
    // 数据字典平台key
    String PLATFORM_KEY = "platform";

    /**
     * 字典KEY前缀
     */
    String DICT_TYPE_CACHE_PREFIX = "DICT_TYPE:";

    /**
     * 平台KEY前缀
     */
    String PLATFORM_CACHE_PREFIX = "PLATFORM:";

    /**
     * 基础字段配置KEY前缀
     */
    String BASE_COLUMN_CONFIG_PREFIX = "BASE_COLUMN_CONFIG:";

    /**
     * 账单字段配置KEY前缀
     */
    String BILL_COLUMN_CONFIG_PREFIX = "BILL_COLUMN_CONFIG:";

    /**
     * 账单字段符合条件配置KEY前缀 %s是配置ID
     */
    String BILL_COLUMN_CONDITION_PREFIX = "BILL_COLUMN_CONDITION:%s";

    /**
     * 字段合并配置KEY前缀
     */
    String BILL_COLUMN_APPEND_PREFIX = "BILL_COLUMN_APPEND:";

    /**
     * 店铺KEY前缀
     */
    String STORE_CACHE_PREFIX = "STORE:";
    /**
     * 店铺编码KEY前缀
     */
    String STORE_CODE_CACHE_PREFIX = "STORE_CODE:";

    /**
     * 店铺KEY前缀
     */
    String INNER_STORE_CACHE_PREFIX = "INNER_STORE:";

    /**
     * 店铺账号KEY前缀
     */
    String STORE_ACCOUNT_PREFIX = "STORE_ACCOUNT:";

    /**
     * 字典KEY前缀
     */
    String DICT_CACHE_PREFIX = "DICT:";

    /**
     * 科目KEY前缀
     */
    String SUBJECTS_PREFIX = "SUBJECTS:";

    /**
     * 规则KEY前缀
     */
    String RULER_CACHE_ALL = "RULER:ALL";

    /**
     * 记账项目规则KEY前缀 第一个%s是平台，第二个%s是科目
     */
    String ACCOUNTING_PROJECT = "ACCOUNTING_PROJECT:%s:%s";

    /**
     * 首页数据KEY前缀
     */
    String INDEX_DATA = "INDEX:DATA";

    /**
     * 标准账单明细KEY
     */
    String ORDER_DETAIL_KEY = "sysOrderDetail";

    /**
     * 标准订单汇总KEY
     */
    String ORDER_KEY = "sysOrder";

    /**
     * 标准账单汇总KEY
     */
    String BILL_KEY = "sysBill";

    /**
     * OMS订单数据库表KEY
     */
    String OMS_ORDER_KEY = "bsOmsOrderKey";

    /**
     * 归档核销单数据库表KEY
     */
    String FILE_AUDIT_KEY = "fileAuditKey";

    /**
     * OMS销售订单字典KEY
     */
    String OMS_ORDER_DICT_KEY = "omsOrder";
    /**
     * OMS售后单字典KEY
     */
    String OMS_RETURN_ORDER_DICT_KEY = "omsReturnOrder";
    /**
     * 天猫结算单KEY
     */
    String TM_BILL = "tmBillTable";

    /**
     * 小红书订单销售KEY
     */
    String XHS_ORDER = "xhsOrderTable";
    /**
     * 小红书订单退款KEY
     */
    String XHS_REFUND = "xhsRefundTable";

    /**
     * 小红书货款明细KEY
     */
    String XHS_SALE_DETAIL = "xhsSaleDetailTable";

    /**
     * 小红书微信明细KEY
     */
    String XHS_WECHAT_DETAIL = "xhsWechatDetailTable";
    /**
     * 抖音结算单KEY
     */
    String DY_BILL = "dyBillTable";

    /**
     * 京东结算单KEY
     */
    String JD_BILL = "jdBillTable";
    /**
     * 天猫订单KEY
     */
    String TM_ORDER_TABLE = "tmOrderTable";
    /**
     * 天猫资金流水表名KEY
     */
    String TM_FUND_FLOW_TABLE = "tmFundFlowTable";

    /**
     * 京东资金流水表名KEY
     */
    String JD_FUND_FLOW_TABLE = "jdFundFlowTable";
    /**
     * 抖音资金流水表名KEY
     */
    String DY_FUND_FLOW_TABLE = "dyFundFlowTable";

    /**
     * 拼多多资金流水表名KEY
     */
    String PDD_FUND_FLOW_TABLE = "pddFundFlowTable";
    /**
     * 视频号资金流水表名KEY
     */
    String SPH_FUND_FLOW_TABLE = "sphFundFlowTable";
    /**
     * 微店资金流水表名KEY
     */
    String WD_FUND_FLOW_TABLE = "wdFundFlowTable";
    /**
     * 微盟资金流水表名KEY
     */
    String WM_FUND_FLOW_TABLE = "wmFundFlowTable";
    /**
     * 微盟资金流水表名KEY
     */
    String WM_TRADE_DETAIL_TABLE = "wmTradeDetailTable";
    /**
     * 拼多多保证金明细表名KEY
     */
    String PDD_DEPOSIT_TABLE = "pddDepositTable";

    /**
     * 有赞资金流水表名KEY
     */
    String YZ_FUND_FLOW_TABLE = "yzFundFlowTable";

    /**
     * WEBHOOK KEY
     */
    String WEB_HOOK_KEY = "WebHook";

    /**
     * 天猫账单KEY
     */
    String T_MALL_ORDER = "TMallorder";

    /**
     * 天猫结算单中文KEY
     */
    String T_MALL_BILL_CN = "天猫结算单";

    /**
     * 京东结算单中文KEY
     */
    String JD_BILL_CN = "京东结算单";

    /**
     * 抖音结算单中文KEY
     */
    String DY_BILL_CN = "抖音结算单";

    /**
     * 平台唯一ID
     */
    String PLATFORM_UNIQUE_FLAG = "唯一标识";

    /**
     * OMS平台订单KEY
     */
    String OMS_PLATFORM_ORDER = "omsPlatformOrder";
    /**
     * 平台主子单号配置KEY
     */
    String SYS_MAIN_SUB_NO_CONFIG = "sysMainSubNoConfig:";
    /**
     * 原始主订单号
     */
    String SOURCE_MAIN_NO = "原始主订单号";
    /**
     * 原始子订单号
     */
    String SOURCE_SUB_NO = "原始子订单号";

    /**
     * 企业微信标识
     */
    String WECHAT = "qywx";

    List<String> OMS_CONFIG = Arrays.asList("omsOrder", "omsReturnOrder");
    // 开始导入微盟交易明细的标识
    String IMPORT_WM_TRADE_DETAIL_FLAG = "importWMTradeDetailFlag";
    // 来源单据
    String SOURCE_ORDER = "sourceOrder";

    // 资金项目类别配置
    String FUNDING_PROJECT = "fundingProjectCategory";

    // 资金日报KEY(格式：日期范围:storeKey:storeId)
    String FUNDS_DAILY_REPORT_KEY = "FUNDS_DAILY_REPORT_KEY:%s:%s:%s";

    String AUDIT_LOCK_PREFIX = "LOCK:AUDIT:";
    String CONSUMER_LOCK_PREFIX = "LOCK:CONSUMER:";

    String WORKING_QUEUE_LOCK = "LOCK:WORKING_QUEUE";
    String IMPORT_WORKING_QUEUE_LOCK = "LOCK:IMPORT_WORKING_QUEUE";
}
